import React, { PureComponent } from 'react'
import { Redirect } from 'react-router-dom'
import { connect } from 'react-redux'
class Write extends PureComponent {
    render() {
        const { loginStateus } = this.props
        if (loginStateus) {
            return (
                <div>写文章页面</div>
            )
        } else {
           return <Redirect to={'/login'} />
        }
    }
}
const mapStateToProps = (state) => {
    return {
        loginStateus: state.getIn(['login', 'login'])
    }
}
export default connect(mapStateToProps, null)(Write)